const sessionStorage = window.sessionStorage
const localStorage = window.localStorage
const ss = {
    get:(key) =>{
        return JSON.parse(sessionStorage.getItem(key))
    },
    set: (key,val) => {
        sessionStorage.setItem(key, JSON.stringify(val));
    },
    remove: key => sessionStorage.removeItem(key),
    clear: () => sessionStorage.clear() //清除 sessionStorage 对象所有的项。
}
const ls = {
    get:(key) =>{
        return JSON.parse(localStorage.getItem(key))
    },
    set: (key,val) => {
        localStorage.setItem(key, JSON.stringify(val));
    },
    remove: key => localStorage.removeItem(key),
    clear: () => localStorage.clear() //清除 localStorage 对象所有的项。
}
export {ss,ls}